package com.cg.slms.domain;

import org.hibernate.validator.constraints.Length;

/**
 * @apiNote 商品
 * @author GSC
 *
 */
public class Merchandise {
	
	private Integer id;//序号
	@Length(max=3,min=1,message="商品编号长度在1-3之间")
	private String code;//商品编号
	@Length(max=30,min=1,message="商品编号长度在1-30之间")
	private String name;//商品名称
	private float price;//商品单价
	public String toString() {
		return "商品id:"+id+" code:"+code+" name:"+name+" price:"+price;
	}
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public float getPrice() {
		return price;
	}
	public void setPrice(float price) {
		this.price = price;
	}

}
